#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int main()
{
    FILE* fp;
    int a[10] = { 1,2,3,4,5,6,7,8,9,10 }, b[5], i = 0;
    fp = fopen("text.dat", "wb+");
    if (fp == NULL)
    {
        printf("no\n");
        exit(0);
    }
    else
    {
        fwrite(a, 4, 10, fp);
        rewind(fp);
        do
        {
            fread(&b[i], 4, 1, fp);
            fseek(fp, 4, 1);
            i++;
        } while (i < 5);
        fclose(fp);
        for (i = 0;i < 5;i++)
            printf("%d\t", b[i]);
    }

    return 0;
}